//
//  LDBaseDiamondBtn.swift
//  DingDongZP
//
//  Created by 三秒文化 on 16/5/22.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

import UIKit

class LDBaseDiamondBtn: UIView {

    var imgurl = ""
    var title:String?//  = ""
    
    private var imgView:UIImageView?
    private var labTitle:UILabel?
    
     override init(frame: CGRect) {
        super.init(frame: frame)
        
        backgroundColor = UIColor.whiteColor()
        
        imgView = UIImageView.init()
        imgView?.setImageWithURL(NSURL(string: imgurl)!, placeholderImage: UIImage(named: "btg_icon_report_pressed"))
        labTitle = UILabel.setDetailsLab(title, fontSize: 14, titleColor: LDFontColor.Green, Alignment: .Center)
        
        addSubview(imgView!)
        addSubview(labTitle!)
        
        imgView?.snp_makeConstraints(closure: { (make) in
            make.top.equalTo(0)
            make.size.equalTo(CGSizeMake(80, 80))
        })
        
        labTitle?.snp_makeConstraints(closure: { (make) in
            make.top.equalTo(0)
            make.height.equalTo(12)
        })
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
}
